#pragma once
#include <iostream>
#include <assert.h>

using namespace std;

typedef int HeapDateType;
typedef struct Heap
{
	HeapDateType* a;
	int size;
	int capacity;
}Heap;

void HeapInit(Heap* php);
void HeapDestroy(Heap* php);
void HeapPush(Heap* php, HeapDateType x);
void HeapPop(Heap* php);
HeapDateType HeapTop(Heap* php);
int HeapSize(Heap* php);
bool HeapEmpty(Heap* php);
void HeapPrint(Heap* php);
void AdjustDwon(HeapDateType* a, int size, int parent);
void AdjustUp(HeapDateType* a, int child);
void Swap(HeapDateType* child, HeapDateType* parent);